<html>
<head><meta charset="utf-8"><title>Prelude 2021 · edition 2021 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/index.html">edition 2021</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html">Prelude 2021</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="220859706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/220859706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kitsu <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#220859706">(Dec 24 2020 at 09:47)</a>:</h4>
<p>There was a discussion regarding adding <code>core::convert::identity</code> to the prelude. Is it considered to be added in new edition?</p>



<a name="220901890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/220901890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#220901890">(Dec 25 2020 at 02:59)</a>:</h4>
<p>It's not a trait, so I don't think it needs to be an <em>edition</em> addition, so would probably just be a #t-libs question, not a #edition one</p>



<a name="220901944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/220901944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> isHavvy <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#220901944">(Dec 25 2020 at 03:00)</a>:</h4>
<p>IMO, it's best to bundle such changes together if we're thinking about these changes at all.</p>



<a name="220902032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/220902032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#220902032">(Dec 25 2020 at 03:03)</a>:</h4>
<p>Can you elaborate?  If something is strictly non-breaking and the relevant team decides it's wanted, why shouldn't it just go in the current prelude without waiting on the edition?  (And then be carried forward into the next prelude too.)</p>



<a name="220902966"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/220902966" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> isHavvy <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#220902966">(Dec 25 2020 at 03:34)</a>:</h4>
<p>I've seen a lot of confusion over similar changes happening a few releases apart where one person thinks the other change happens or that it overrides the other change. It all gets sorted out over time, but the conversations do get weary after awhile. Plus, it's easier to document the prelude change once rather than multiple times.</p>



<a name="220986864"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/220986864" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#220986864">(Dec 27 2020 at 01:11)</a>:</h4>
<p>I agree with isHavvy. Since it's not pressing, we should group the prelude changes together.</p>



<a name="221212892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/221212892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#221212892">(Dec 30 2020 at 13:39)</a>:</h4>
<p>If nothing is broken by a prelude addition, there’s no point in making it edition-specific or grouping it together with other change</p>



<a name="221213142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/221213142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#221213142">(Dec 30 2020 at 13:43)</a>:</h4>
<p>For <code>identity</code> specifically I’m not convinced that it’s useful enough to justify adding it to the prelude. (But I’m not really opposed, if there’s consensus that it is)</p>



<a name="221213725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/221213725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#221213725">(Dec 30 2020 at 13:52)</a>:</h4>
<p><span class="user-mention" data-user-id="310399">@Mara</span> <a href="https://hackmd.io/3eG6OZWHRbSMxoRxzwNhGQ?view#-Prelude-changes">https://hackmd.io/3eG6OZWHRbSMxoRxzwNhGQ?view#-Prelude-changes</a> lists 5 possible additions to a new edition-specific prelude, but of those only <code>TryFrom</code>/<code>TryInto</code> causes breakage that I know of. Unless there’s evidence of such breakage the rest should be considered for possible addition to the existing prelude, unrelated to editions</p>



<a name="221213792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/221213792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#221213792">(Dec 30 2020 at 13:53)</a>:</h4>
<p><span class="user-mention" data-user-id="219747">@Simon Sapin</span> yes, absolutely. for now i just want to collect all ideas in this document. but indeed, quite a few things might not require an edition change.</p>



<a name="221213813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/221213813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#221213813">(Dec 30 2020 at 13:53)</a>:</h4>
<p>Ok</p>



<a name="221213884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/221213884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#221213884">(Dec 30 2020 at 13:54)</a>:</h4>
<p>but feel free to cross things out if it's already clear that it won't require an edition change</p>



<a name="221213896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/221213896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#221213896">(Dec 30 2020 at 13:55)</a>:</h4>
<p>Does editing require an account?</p>



<a name="221213907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/221213907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#221213907">(Dec 30 2020 at 13:55)</a>:</h4>
<p>oh, i think so, yes. you can log in with github. does that work for you?</p>



<a name="221214002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/221214002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#221214002">(Dec 30 2020 at 13:57)</a>:</h4>
<p><span class="user-mention" data-user-id="310399">@Mara</span> Also one reason the edition prelude didn’t happen for 2018 is we’d need to develop a compatibility warning to detect for example calls to <a href="https://crates.io/crates/try_from">https://crates.io/crates/try_from</a> that would become ambiguous with the new prelude. <a href="https://rust-lang.github.io/rfcs/2052-epochs.html#hard-constraints">https://rust-lang.github.io/rfcs/2052-epochs.html#hard-constraints</a> specifies this as a "hard constraint"</p>



<a name="221214107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/221214107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#221214107">(Dec 30 2020 at 13:58)</a>:</h4>
<p>Thanks, added it to the notes.</p>



<a name="221214189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/221214189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#221214189">(Dec 30 2020 at 14:00)</a>:</h4>
<blockquote>
<p>Prioritization of glob import method resolution the same as item resolution (language change)</p>
</blockquote>
<p>This sounds related but I’m not sure it is exactly the same: <em>name</em> resolution was changed some time ago so that an explicit import would "win" over the prelude, but not <em>trait method</em> resolution. The latter is what affects <code>TryFrom</code> / <code>TryInto</code>.</p>



<a name="221214269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/221214269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#221214269">(Dec 30 2020 at 14:01)</a>:</h4>
<p>TIL hackmd has github login, thanks</p>



<a name="221214410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/221214410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#221214410">(Dec 30 2020 at 14:03)</a>:</h4>
<p>thanks for contributing to the document ^^</p>



<a name="227995643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/227995643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dirkjan Ochtman <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#227995643">(Feb 26 2021 at 21:18)</a>:</h4>
<p>Initial RFC draft: <a href="https://github.com/rust-lang/rfcs/pull/3090">https://github.com/rust-lang/rfcs/pull/3090</a></p>



<a name="227995652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/227995652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dirkjan Ochtman <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#227995652">(Feb 26 2021 at 21:18)</a>:</h4>
<p>please comment there</p>



<a name="230409913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/230409913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#230409913">(Mar 15 2021 at 20:07)</a>:</h4>
<p>we should probably also <em>remove</em> RustcEncodable and RustcDecodable from the new prelude.</p>



<a name="230419727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/230419727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#230419727">(Mar 15 2021 at 21:14)</a>:</h4>
<p>can we remove those from 2021 altogether? IIUC they're builtin attributes, right?</p>



<a name="230420691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/230420691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#230420691">(Mar 15 2021 at 21:21)</a>:</h4>
<p>yes, they're only available through the prelude. so if we remove those they're gone from the new edition.</p>



<a name="230422011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/230422011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#230422011">(Mar 15 2021 at 21:32)</a>:</h4>
<p>no wait, that's not exactly true. you could still reach them through std::prelude::v1::RustcEncodable.</p>



<a name="230422114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/230422114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#230422114">(Mar 15 2021 at 21:33)</a>:</h4>
<p>but at least a regular <code>#[derive(RustcEncodable)]</code> wont work without the full path through <code>v1</code> or <code>rust_2015</code>/<code>rust_2018</code> then</p>



<a name="230423042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/230423042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#230423042">(Mar 15 2021 at 21:41)</a>:</h4>
<p>looks like they are also in the root of <code>core</code></p>



<a name="230423072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/230423072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#230423072">(Mar 15 2021 at 21:41)</a>:</h4>
<p>or at least, that's where they are documented</p>



<a name="230423503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/230423503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#230423503">(Mar 15 2021 at 21:45)</a>:</h4>
<p><span class="user-mention" data-user-id="138448">@cuviper</span> not on beta and nightly anymore</p>



<a name="230423663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/230423663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#230423663">(Mar 15 2021 at 21:46)</a>:</h4>
<p>ah, ok</p>



<a name="230423768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/230423768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#230423768">(Mar 15 2021 at 21:48)</a>:</h4>
<p>seems that path wasn't actually usable on stable either</p>



<a name="230432948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/230432948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#230432948">(Mar 15 2021 at 22:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="138448">cuviper</span> <a href="#narrow/stream/268952-edition-2021/topic/Prelude.202021/near/230423768">said</a>:</p>
<blockquote>
<p>seems that path wasn't actually usable on stable either</p>
</blockquote>
<p>yeah that was just a rustdoc bug</p>



<a name="230432968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Prelude%202021/near/230432968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Prelude.202021.html#230432968">(Mar 15 2021 at 22:41)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/77862">https://github.com/rust-lang/rust/pull/77862</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>